home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Caption = "Cell Formatting Example"
- ClientHeight = 5310
- ClientLeft = 1185
- ClientTop = 1470
- ClientWidth = 7575
- Height = 5715
- Icon = "format1.frx":0000
- Left = 1125
- LinkTopic = "Form1"
- ScaleHeight = 5310
- ScaleWidth = 7575
- Top = 1125
- Width = 7695
- Begin VB.CommandButton cmdFormat
- Caption = "3D Effects 2"
- Height = 375
- Index = 15
- Left = 5940
- TabIndex = 16
- Top = 4020
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "3D Effects 1"
- Height = 375
- Index = 14
- Left = 5940
- TabIndex = 15
- Top = 3660
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "List 3"
- Height = 375
- Index = 13
- Left = 4560
- TabIndex = 14
- Top = 4380
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "List 2"
- Height = 375
- Index = 12
- Left = 4560
- TabIndex = 13
- Top = 4020
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "List 1"
- Height = 375
- Index = 11
- Left = 4560
- TabIndex = 12
- Top = 3660
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Colorful 4"
- Height = 375
- Index = 10
- Left = 3180
- TabIndex = 11
- Top = 4740
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Colorful 3"
- Height = 375
- Index = 9
- Left = 3180
- TabIndex = 10
- Top = 4380
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Colorful 2"
- Height = 375
- Index = 8
- Left = 3180
- TabIndex = 9
- Top = 4020
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Colorful 1"
- Height = 375
- Index = 7
- Left = 3180
- TabIndex = 8
- Top = 3660
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Accounting 3"
- Height = 375
- Index = 6
- Left = 1800
- TabIndex = 7
- Top = 4380
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Accounting 2"
- Height = 375
- Index = 5
- Left = 1800
- TabIndex = 6
- Top = 4020
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Accounting 1"
- Height = 375
- Index = 4
- Left = 1800
- TabIndex = 5
- Top = 3660
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Classic 3"
- Height = 375
- Index = 3
- Left = 420
- TabIndex = 4
- Top = 4740
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Classic 2"
- Height = 375
- Index = 2
- Left = 420
- TabIndex = 3
- Top = 4380
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Classic 1"
- Height = 375
- Index = 1
- Left = 420
- TabIndex = 2
- Top = 4020
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Simple"
- Height = 375
- Index = 0
- Left = 420
- TabIndex = 1
- Top = 3660
- Width = 1215
- End
- Begin VCF150Ctl.F1Book F1Book1
- Height = 2475
- Left = 240
- TabIndex = 17
- Top = 1020
- Width = 6975
- _ExtentX = 12303
- _ExtentY = 4366
- _0 = $"format1.frx":044A
- _1 = $"format1.frx":084F
- _2 = $"format1.frx":0C54
- _3 = $"format1.frx":1059
- _4 = $"format1.frx":145E
- _count = 5
- _ver = 1
- End
- Begin VB.Label Label1
- Caption = $"format1.frx":15A7
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Arial"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 735
- Left = 240
- TabIndex = 0
- Top = 60
- Width = 7035
- WordWrap = -1 'True
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub cmdFormat_Click(Index As Integer)
- With F1Book1
- '' To make this work with any selection you will want to enable
- '' selections, scrollbars, and remove the following 2 lines.
- '' Then this example will work with the active selection. You
- '' should do some error checking to ensure the selection is
- '' proper - contains all required Ranges according to the
- '' Cell_Formatting Module instructions.
- .SetSelection 2, 2, 8, 6
- .BackColor = .PaletteEntry(2)
- '' All functions below preserve the initial seleciton
- Select Case Index
- Case 0: ' Simple
- Call FormatCells(F1Book1, SIMPLE)
-
- Case 1: ' Classic 1
- Call FormatCells(F1Book1, CLASSIC1)
-
- Case 2: ' Classic 2
- Call FormatCells(F1Book1, CLASSIC2)
- Case 3: ' Classic 3
- Call FormatCells(F1Book1, CLASSIC3)
-
- Case 4:
- Call FormatCells(F1Book1, ACCOUNTING1)
-
- Case 5:
- Call FormatCells(F1Book1, ACCOUNTING2)
-
- Case 6:
- Call FormatCells(F1Book1, ACCOUNTING3)
-
- Case 7: ' Colorful 1
- Call FormatCells(F1Book1, COLORFUL1)
-
- Case 8: ' Colorful 2
- Call FormatCells(F1Book1, COLORFUL2)
-
- Case 9: ' Colorful 3
- Call FormatCells(F1Book1, COLORFUL3)
-
- Case 10: ' Colorful 4
- Call FormatCells(F1Book1, COLORFUL4)
-
- Case 11: ' List 1
- Call FormatCells(F1Book1, LIST1)
-
- Case 12: ' List 2
- Call FormatCells(F1Book1, LIST2)
-
- Case 13: ' List 3
- Call FormatCells(F1Book1, LIST3)
-
- Case 14: ' 3D Effects 1
- Call FormatCells(F1Book1, EFFECTS3D1)
-
- Case 15: ' 3D Effects 2
- Call FormatCells(F1Book1, EFFECTS3D2)
-
- End Select
-
- End With
-
- End Sub
- Private Sub Form_Load()
- F1Book1.ReadEx ("f1book1.vts")
- End Sub
-